//
//  OATravelDetailsVC.m
//  OA项目
//
//  Created by innofive on 2018/4/17.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OATravelDetailsVC.h"
#import "OAApprovelistCell.h"
#import "OAApproveRejectedVC.h"
@interface OATravelDetailsVC ()

@end

@implementation OATravelDetailsVC

- (void)viewDidLoad {
    [super viewDidLoad];

    NSArray *arr = @[@{@"name1":@"状态",@"name2":@"待审批"},
                     @{@"name1":@"申请人",@"name2":@"超级管理员"},
                     @{@"name1":@"出差地",@"name2":@"广州"},
                     @{@"name1":@"起始日期",@"name2":@"2017-11-29 09:00"},
                     @{@"name1":@"终止日期",@"name2":@"2017-11-30 09:00"},
                     @{@"name1":@"出差地",@"name2":@"海口"},
                     @{@"name1":@"起始日期",@"name2":@"2017-11-31 09:00"},
                     @{@"name1":@"终止日期",@"name2":@"2017-12-1 18:00"},
                     @{@"name1":@"合计",@"name2":@"10天"},
                     @{@"name1":@"事由",@"name2":@"万达项目"},
                     @{@"name1":@"人员",@"name2":@"痒痒,六六"},
                     @{@"name1":@"抄送",@"name2":@""},
                     @{@"name1":@"",@"name2":@""},
                     
                     ];
    
    [self.dataArr addObjectsFromArray:arr];
}

-(void)onLoadViewByWillAppear:(UIView *)view
{
    [self.tableView config:^(UITableView *tableView) {
        [tableView setSeparatorMan];
    }];
}

#pragma mark - 点击方法

-(void)onClick:(UIButton *)button
{
    
    OAApproveRejectedVC *vc =[OAApproveRejectedVC rejectedVCForType:button.tag==20?openVCTypeOne:openVCTypeTwo];
    
    [self presentWindowToVC:vc IsNaV:NO Completion:^{
        
    }];
}

-(void)onSetSubviewSELForCell:(BaseTableViewCell *)cell forTableView:(UITableView *)tableView forIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row==self.dataArr.count-2) {
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }else
    {
        cell.accessoryType = UITableViewCellAccessoryNone;
    }
}


-(MCCellInfo *)tableView:(UITableView *)tableView cellForIndexPath:(NSIndexPath *)indexPath IsHeight:(BOOL)isheight
{
    if (indexPath.row==self.dataArr.count-1)
    {
        return [MCCellInfo configForCellId:cell3 Class:[OAApproveDetailsCell3 class] Height:kFitH(85) TableView:tableView];
    }
    return [MCCellInfo configForCellId:cell Class:[OAApproveDetailsCell class] Height:kFitH(40) TableView:tableView];
}

@end
